/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package androidpos.db;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author user
 */
public class ConnectToDB {
    private Connection con;
    public ConnectToDB() {
        try {
            Class.forName("com.mysql.jdbc.Driver");
            con = DriverManager.getConnection("jdbc:mysql://" + Data.DB_HOST + "/" + Data.DB_NAME, Data.DB_USRNAME, Data.DB_PASSWORD);
        } catch (Exception e) {
            System.out.println(e.toString());
        }
    }
    public Connection getConnection(){
        return con;
    }
}
